package com.foosun.core.entity.validator;

import org.springframework.validation.Errors;
import org.springframework.validation.ValidationUtils;
import org.springframework.validation.Validator;

import com.foosun.core.entity.SysConfig;

public class SysConfigValidator implements Validator {

	@Override
	public boolean supports(Class<?> clazz) {
		return SysConfig.class.isAssignableFrom(clazz);
	}

	@Override
	public void validate(Object target, Errors errors) {
        ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "field.required");
//        SysConfig sysConfig = (SysConfig) target;
	}

}
